﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using NyBio.Model;
using NyBio.DB;

namespace NyBio.Ctrl
{
    public class ScheduleCtrl
    {
        private ScheduleDB scheduleDB;

        public ScheduleCtrl()
        {
            scheduleDB = new ScheduleDB();
        }

        public Schedule getScheduleById(int id)
        {
            return scheduleDB.getScheduleById(id);
        }

        public List<Schedule> getScheduleByMovieId(int id)
        {
            return scheduleDB.getScheduleByMovieId(id);
        }

        public List<Schedule> getScheduleByMovieTitle(string title)
        {
            return scheduleDB.getScheduleByMovieTitle(title);
        }

        public List<Schedule> getSchedules()
        {
            return scheduleDB.getSchedules();
        }

        public void deleteSchedule(int id)
        {
            scheduleDB.removeSchedule(id);
        }

        internal void insertschedule(Schedule schedule)
        {
            scheduleDB.insertSchedule(schedule);
        }

        internal void updateSchedule(Schedule schedule)
        {
            scheduleDB.updateSchedule(schedule);
        }
    }
}
